﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="Dealers.aspx.cs" Inherits="GMAC.ReportingSystem.Paginas.Dealers" Theme="Theme" EnableTheming="true" EnableEventValidation="false" %>

<%@ Register assembly="FrameworkManapro.WebUI" namespace="FrameworkManapro.WebUI" tagprefix="fwm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

    <script type="text/javascript" src="../Scripts/Validations.js"></script>

    <script type="text/javascript" src="../Scripts/CheckFramesAndRedirect.js"></script>

    <script type="text/javascript">
        function ExpandPanel() {
            var pnlDetailsExtender = $find("pnlDetailsExtender");
            var pnlSearchExtender = $find("pnlSearchExtender");
            if (pnlDetailsExtender != null)

                pnlDetailsExtender.expandPanel();
            pnlSearchExtender.collapsePanel();
        }
      
    </script>

    <style type="text/css">
        .style1
        {
            height: 6px;
        }
    </style>

</head>
<body class="TotalBody">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <div class="Contenedor" style = "padding-bottom: 10px; padding-top:10px;">
        <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; vertical-align: top">
            <tr>
                <td style="text-align: left">
                    <span class="FontArialPaddingLeft15 TitleFontBlue FontArialBoldCaps">&nbsp;Dealers</span></td>
            </tr>
            <tr>
                <td align="center">
                    <div class="WindowHeightMain">
                        <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; vertical-align: top">
                            <tr>
                                <td class="TDSeparadorV" colspan="2">
                                </td>
                            </tr>
                            <tr class="SearchBackground" style="width: 100%">
                                <td class="TDBorder">
                                    <table cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td style="padding-left: 10px; text-align: left; width: 100%">
                                                <span class="FontArialBoldCaps" style="font-size: 14px">Search Filter</span>
                                            </td>
                                            <td style="padding-right: 10px; text-align: right">
                                                <asp:ImageButton ID="imgCollapseSearch" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Images IE6/Minus.gif"
                                                    Width="25px" Height="25px" OnClientClick="return false;" runat="server" BorderWidth="0px" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Panel ID="pnlSearch" runat="server" SkinID="pnlBusqueda" Height="158px">
                                        <table cellpadding="0" cellspacing="0" border="0" visible="false">
                                            <tr>
                                                <td valign="top">
                                                    <table cellpadding="0" cellspacing="0" border="0">
                                                        <tr style="padding-left: 10px">
                                                            <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                                Dealer Number</td>
                                                            <td class="TDTextBox">
                                                                <asp:TextBox ID="txtDealerNumberSearch" runat="server" MaxLength="10" SkinID="TextBox12px"
                                                                    TextMode="SingleLine" TabIndex="1"></asp:TextBox>
                                                                <cc1:FilteredTextBoxExtender ID="txtDealerNumberSearch_FilteredTextBoxExtender" 
                                                                    runat="server" TargetControlID="txtDealerNumberSearch"
                                                                    FilterType="Numbers" Enabled="True">
                                                                </cc1:FilteredTextBoxExtender>
                                                            </td>
                                                        </tr>
                                                        <tr style="padding-left: 10px">
                                                            <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                &nbsp;</td>
                                                            <td class="TDTextBox">
                                                                &nbsp;</td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td class="TDSeparadorH">
                                                </td>
                                                <td>
                                                    <table border="0" cellpadding="0" cellspacing="0">
                                                        <tr style="padding-left: 10px">
                                                            <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                Dealer Name</td>
                                                            <td class="TDTextBox">
                                                                
                                                                <asp:TextBox ID="txtDealerNameSearch" runat="server" MaxLength="50" 
                                                                    SkinID="TextBox12px" TabIndex="2" TextMode="SingleLine"></asp:TextBox>
                                                                <cc1:FilteredTextBoxExtender ID="txtDealerNameSearch_FilteredTextBoxExtender" 
                                                                    runat="server" SkinID="filterText" TargetControlID="txtDealerNameSearch">
                                                                </cc1:FilteredTextBoxExtender>
                                                            </td>
                                                        </tr>
                                                        <tr style="padding-left: 10px">
                                                            <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                &nbsp;</td>
                                                            <td class="TDTextBox">
                                                                <asp:ImageButton ID="imgBuscarReg" runat="server" CausesValidation="false" 
                                                                    Height="25px" ImageAlign="Middle" 
                                                                    ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Find.jpg" 
                                                                    OnClick="imgBuscarReg_Click" TabIndex="3" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td id="Botones" style="vertical-align: middle">
                                                    &nbsp;</td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                    <cc1:CollapsiblePanelExtender ID="pnlSearch_Collapse" runat="server" TargetControlID="pnlSearch"
                                        BehaviorID="pnlSearchExtender" CollapsedImage="~/App_Themes/Theme/Images/Images IE6/Plus.gif"
                                        ExpandedImage="~/App_Themes/Theme/Images/Images IE6/Minus.gif" CollapseControlID="imgCollapseSearch"
                                        ExpandControlID="imgCollapseSearch" Collapsed="false" SuppressPostBack="false"
                                        ImageControlID="imgCollapseSearch">
                                    </cc1:CollapsiblePanelExtender>
                                </td>
                            </tr>
                            <tr>
                                <td class="TDSeparadorV" colspan="2">
                                </td>
                            </tr>
                            <tr class="SearchBackground" style="width: 100%">
                                <td class="TDBorder">
                                    <table cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td style="padding-left: 10px; text-align: left; width: 100%">
                                                <span class="FontArialBoldCaps" style="font-size: 14px">Edit Fields       
                                                  </td>
                                            <td style="padding-right: 10px; text-align: right">
                                                <asp:ImageButton ID="imgCollapseEdit" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Images IE6/Minus.gif"
                                                    Width="25px" Height="25px" runat="server" BorderWidth="0px" OnClientClick="return false;"
                                                    TabIndex="4" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:UpdatePanel ID="upDetails" runat="server" UpdateMode="Conditional">
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="btnModify" EventName="Click" />
                                        </Triggers>
                                        <ContentTemplate>
                                            <asp:Panel ID="pnlEdit" runat="server" SkinID="pnlBusqueda" Height="300px">
                                                <table cellpadding="0" cellspacing="0" border="0" visible="false">
                                                    <tr>
                                                        <td valign="top">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr style="padding-left: 10px">
                                                                    <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                                        Dealer Number</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:TextBox ID="txtDealerNumber" runat="server" MaxLength="10" SkinID="TextBox12pxDisabled"
                                                                            TextMode="SingleLine" TabIndex="5" Enabled="False"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="rfvDealerNumber" runat="server" ControlToValidate="txtDealerNumber"
                                                                            Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender runat="server" ID="vceUser" 
                                                                            TargetControlID="rfvDealerNumber">
                                                                        </cc1:ValidatorCalloutExtender>
                                                                        
                                                                        <asp:HiddenField ID="hfDealerID" runat="server" />
                                                                    </td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                                        Dealer Name
                                                                    </td>
                                                                    <td class="TDTextBox">
                                                                        <asp:TextBox ID="txtDealerName" runat="server" MaxLength="30" onkeypress="return ValAlfanumerico(event);"
                                                                                    SkinID="TextBox12pxDisabled" TabIndex="1" Enabled="False" ></asp:TextBox>
                                                                                <asp:RequiredFieldValidator   ID="rfvName" runat="server" ControlToValidate="txtDealerName"
                                                                                    Display="Dynamic" ValidationGroup="SaveData">*</asp:RequiredFieldValidator>
                                                                                <cc1:ValidatorCalloutExtender ID="vceName" runat="server" TargetControlID="rfvName">
                                                                                </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        RIF</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:TextBox ID="txtRIF" runat="server" MaxLength="12" Style="text-transform: uppercase"
                                                                                    SkinID="TextBox12pxDisabled" TabIndex="11" Enabled="False" ></asp:TextBox>
                                                                                <asp:RequiredFieldValidator   ID="rfvRIF" runat="server" ControlToValidate="txtRIF"
                                                                                    Display="Dynamic" ValidationGroup="SaveData">*</asp:RequiredFieldValidator>
                                                                                <cc1:MaskedEditExtender ID="maskRIF" runat="server" ClearMaskOnLostFocus="false"
                                                                                    Mask="C-99999999-9" TargetControlID="txtRIF" Filtered="J,G,V,E,P,j,g,v,e,p" MaskType="None">
                                                                                </cc1:MaskedEditExtender>
                                                                                <asp:RegularExpressionValidator ID="revRIF" runat="server" ErrorMessage="RIF Invalido"
                                                                                    ControlToValidate="txtRIF" ValidationExpression="[JGVEPjgvep]-\d{8}-\d" ValidationGroup="SaveData">*</asp:RegularExpressionValidator>
                                                                                <cc1:ValidatorCalloutExtender ID="vceRIF" runat="server" TargetControlID="rfvRIF">
                                                                                </cc1:ValidatorCalloutExtender>
                                                                                <cc1:ValidatorCalloutExtender ID="vceRIF2" runat="server" TargetControlID="revRIF">
                                                                                </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Phone</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:TextBox ID="txtPhone" runat="server" MaxLength="12" SkinID="TextBox12pxDisabled"
                                                                            onkeypress="return ValAlfanumerico(event);" TabIndex="7" Enabled="False"></asp:TextBox>
                                                                            
                                                                        <asp:RequiredFieldValidator ID="rfvPhone" runat="server" ControlToValidate="txtPhone"
                                                                            Display="Dynamic" ValidationGroup="SaveData" 
                                                                            InitialValue="____-_______" >*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="vcePhone" runat="server" TargetControlID="rfvPhone"
                                                                            Enabled="True">
                                                                        </cc1:ValidatorCalloutExtender>
                                                                        <cc1:MaskedEditExtender ID="txtPhone_MaskedEditExtender" 
                                                                            runat="server" ClearMaskOnLostFocus="False" Mask="9999-9999999" 
                                                                            TargetControlID="txtPhone">
                                                                        </cc1:MaskedEditExtender>
                                                                        <asp:CustomValidator ID="ctmvPhone" runat="server" ErrorMessage="Complete el teléfono."
                                                                            ControlToValidate="txtPhone" EnableClientScript="true" ClientValidationFunction="ValidaTelefono"
                                                                            Display="Dynamic" ToolTip="El teléfono debe tener un mínimo de 7 dígitos." 
                                                                            ValidationGroup="SaveData">*</asp:CustomValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="ctmvPhone" Enabled="true" >
                                                                        </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Fax</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:TextBox ID="txtFax" runat="server" MaxLength="12" SkinID="TextBox12pxDisabled"
                                                                            onkeypress="return ValAlfanumerico(event);" TabIndex="7" Enabled="False"></asp:TextBox>
                                                                            
                                                                        <asp:RequiredFieldValidator ID="rfvFax" runat="server" ControlToValidate="txtFax"
                                                                            Display="Dynamic" ValidationGroup="SaveData" 
                                                                            InitialValue="____-_______" >*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="vceFax" runat="server" TargetControlID="rfvFax"
                                                                            Enabled="True">
                                                                        </cc1:ValidatorCalloutExtender>
                                                                        <cc1:MaskedEditExtender ID="txtFax_MaskedEditExtender" 
                                                                            runat="server" ClearMaskOnLostFocus="False" Mask="9999-9999999" 
                                                                            TargetControlID="txtFax">
                                                                        </cc1:MaskedEditExtender>
                                                                        <asp:CustomValidator ID="ctmvFax" runat="server" ErrorMessage="Complete el teléfono."
                                                                            ControlToValidate="txtFax" EnableClientScript="true" ClientValidationFunction="ValidaTelefono"
                                                                            Display="Dynamic" ToolTip="El teléfono debe tener un mínimo de 7 dígitos." 
                                                                            ValidationGroup="SaveData">*</asp:CustomValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="ctmvFax" Enabled="true" >
                                                                        </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Email</td>
                                                                    <td class="TDTextBox">
                                                                         <asp:TextBox ID="txtEmail" runat="server" SkinID="TextBoxEmail12pxDisabled" MaxLength="30"
                                                                            TabIndex="10" Enabled="False"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail"
                                                                            Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                        <asp:RegularExpressionValidator ID="revEmail" runat="server" ErrorMessage="Email format is invalid"
                                                                            ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" ControlToValidate="txtEmail" Display="Dynamic">*</asp:RegularExpressionValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="vceEmail" runat="server" TargetControlID="rfvEmail">
                                                                        </cc1:ValidatorCalloutExtender>
                                                                        <cc1:ValidatorCalloutExtender ID="vceEmail2" runat="server" TargetControlID="revEmail">
                                                                        </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Address</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:TextBox ID="txtAddress" runat="server" MaxLength="500"
                                                                                    SkinID="TextBox12pxMultiDisabled" TextMode="MultiLine" 
                                                                                    onkeypress="ValidarCaracteres(this, 500);" 
                                                                                    onkeyup="ValidarCaracteres(this, 500);" TabIndex="13" 
                                                                            Enabled="False" ></asp:TextBox>
                                                                                <cc1:FilteredTextBoxExtender ID="fteAddress" runat="server" 
                                                                                    FilterMode="ValidChars" 
                                                                                    FilterType="LowercaseLetters, UppercaseLetters, Numbers, Custom" 
                                                                                    TargetControlID="txtAddress" ValidChars=" -,.">
                                                                                </cc1:FilteredTextBoxExtender>
                                                                                <asp:RequiredFieldValidator   ID="rfvAddress" runat="server" ControlToValidate="txtAddress"
                                                                                    Display="Dynamic" ValidationGroup="SaveData">*</asp:RequiredFieldValidator>
                                                                                <cc1:ValidatorCalloutExtender ID="vceddress" runat="server" 
                                                                                    TargetControlID="rfvAddress">
                                                                                </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        &nbsp;</td>
                                                                    <td class="TDTextBox">
                                                                        &nbsp;</td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td class="TDSeparadorH">
                                                        </td>
                                                        <td valign="top">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        F&amp;I</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:CheckBox ID="chkFI" runat="server" TabIndex="5" />
                                                                    </td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Dealer Group</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:DropDownList ID="ddlDealerGroup" runat="server" SkinID="ddl12px" 
                                                                            TabIndex="6">
                                                                        </asp:DropDownList>
                                                                      </td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        State</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:DropDownList ID="ddlState" runat="server" SkinID="ddl12px" TabIndex="7">
                                                                        </asp:DropDownList>
                                                                        <asp:RequiredFieldValidator ID="rfvState" runat="server" 
                                                                            ControlToValidate="ddlState" Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="rfvState_ValidatorCalloutExtender" 
                                                                            runat="server" TargetControlID="rfvState">
                                                                        </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Type</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:DropDownList ID="ddlType" runat="server" SkinID="ddl12px" TabIndex="8">
                                                                        </asp:DropDownList>
                                                                        <asp:RequiredFieldValidator ID="rfvType" runat="server" 
                                                                            ControlToValidate="ddlType" Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="rfvType_ValidatorCalloutExtender" 
                                                                            runat="server" TargetControlID="rfvType">
                                                                        </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Glink</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:CheckBox ID="chkGlink" runat="server" TabIndex="9" />
                                                                    </td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Account Representative</td>
                                                                    <td class="TDTextBox">
                                                                        <asp:DropDownList ID="ddlAccountRepresentative" runat="server" SkinID="ddl12px" 
                                                                            TabIndex="10">
                                                                        </asp:DropDownList>
                                                                        <asp:RequiredFieldValidator ID="rfvAccountRepresentative" runat="server" 
                                                                            ControlToValidate="ddlAccountRepresentative" Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="rfvAccountRepresentative_ValidatorCalloutExtender" 
                                                                            runat="server" TargetControlID="rfvAccountRepresentative">
                                                                        </cc1:ValidatorCalloutExtender></td>
                                                                </tr>
                                                                <tr style="padding-left: 10px">
                                                                    <td class="LabelRight12px TDLabelBackground" style="padding-left: 5px">
                                                                        Status</td>
                                                                    <td class="style1" style="font-family:Verdana; font-size:13px">
                                                                        &nbsp;<asp:RadioButtonList ID="optOptions" runat="server" TabIndex="11">
                                                                            <asp:ListItem Selected="True" Value="True">Active</asp:ListItem>
                                                                            <asp:ListItem Value="False">Inactive</asp:ListItem>
                                                                        </asp:RadioButtonList>
                                                                        <asp:RequiredFieldValidator ID="rfvStatus" runat="server" 
                                                                            ControlToValidate="optOptions" Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                        <cc1:ValidatorCalloutExtender ID="vceOptions" runat="server" 
                                                                            TargetControlID="rfvStatus">
                                                                        </cc1:ValidatorCalloutExtender>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td id="BotonesEdit" style="vertical-align: middle; width:100%;" align="right" colspan="3">
                                                            <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Save.jpg"
                                                                OnClick="btnSave_Click" TabIndex="12" />
                                                            <asp:ImageButton ID="btnCancel" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Cancel.gif"
                                                                OnClick="btnCancel_Click" TabIndex="14" CausesValidation="false" />
                                                           
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                            <cc1:CollapsiblePanelExtender ID="pnlEdit_Collapse" runat="server" TargetControlID="pnlEdit"
                                                BehaviorID="pnlDetailsExtender" CollapsedImage="~/App_Themes/Theme/Images/Images IE6/Plus.gif"
                                                ExpandedImage="~/App_Themes/Theme/Images/Images IE6/Minus.gif" CollapseControlID="imgCollapseEdit"
                                                ExpandControlID="imgCollapseEdit" Collapsed="true" SuppressPostBack="false" ImageControlID="imgCollapseEdit">
                                            </cc1:CollapsiblePanelExtender>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td class="TDSeparadorV" colspan="2">
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left" colspan="2">
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <ContentTemplate>
                                            <asp:GridView ID="grvDealers" runat="server" SkinID="GridGMAC" AutoGenerateColumns="False"
                                                Width="100%" OnRowDataBound="grvDealers_RowDataBound" DataKeyNames="DealerID">
                                                <Columns>
                                                    <asp:BoundField HeaderText="RIF" DataField="DealerTaxID" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField HeaderText="Dealer Number" DataField="DealerNumber" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"/>
                                                    <asp:BoundField DataField="DealerName" HeaderText="DealerName" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                                    <asp:BoundField HeaderText="Status" DataField="Status" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                                    
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <asp:HiddenField ID="hfStatus" runat="server" Value='<%# Eval("Status") %>'/>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    
                                                </Columns>
                                                <HeaderStyle HorizontalAlign="Center" />
                                            </asp:GridView>
                                            <fwm:PagingControl ID="PagingControl" runat="server" 
                                                AllowPageSizeChange="false" OnPageChanged="pagingControl_PageChanged" 
                                                ShowCurrentRecordsLegend="false" TabIndex="15"  />
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="grvDealers" EventName="SelectedIndexChanged" />
                                            <asp:AsyncPostBackTrigger ControlID="imgBuscarReg" EventName="Click" />
                                        </Triggers>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                    <asp:UpdatePanel ID="upMessageConfirm" runat="server" UpdateMode="Conditional">
                                        <ContentTemplate>
                                            <asp:ImageButton ID="btnModify" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Modify.jpg"
                                                OnClick="btnModify_Click" OnClientClick="ExpandPanel();" CausesValidation="false"
                                                TabIndex="16" />
                                            <%--<cc1:ConfirmButtonExtender ID="confirmExtender" runat="server" DisplayModalPopupID="popupExtenderConfirm"
                                                TargetControlID="btnDelete">
                                            </cc1:ConfirmButtonExtender>--%>
                                           
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <asp:UpdatePanel ID="upMessage" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <asp:Panel ID="pnlMessage" runat="server" CssClass="modalPopup" Height="140px" Style="display: none;"
                Width="400px">
                <table width="100%">
                    <tr style="height: 100px">
                        <td style="height: 100%" align="center">
                            <uc1:wucMessage ID="wucMessage" runat="server" />
                        </td>
                    </tr>
                    <tr style="vertical-align: bottom">
                        <td align="center">
                            <asp:ImageButton ID="btnAccept" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="popupExtenderMessage" runat="server" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="pnlMessage" TargetControlID="lnkPopupMessage"
                CancelControlID="btnAccept">
            </cc1:ModalPopupExtender>
            <asp:LinkButton ID="lnkPopupMessage" runat="server"></asp:LinkButton>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>

